package spring.cloud.tasks.common.zookeeper;


import org.apache.zookeeper.ZooKeeper;
import spring.cloud.tasks.client.Worker;
import spring.cloud.tasks.client.WorkerInfo;

import java.util.List;

public abstract class ZooKeeperDataManager {
    public abstract ZooKeeper getZooKeeper() throws Exception;

    public abstract List<String> registerWorkerToPermittedTaskList(Worker worker);

    public abstract List<String> registerWorkerToPermittedTaskListWhenPongPong(Worker worker);

    public abstract WorkerInfo loadWorkerInfo(String workerId) throws Exception;

    public abstract void unRegisterWorker(Worker worker) throws Exception;


}
